Assign variables as if they were an array:
The list() function is used to assign values to a list of variables in one operation.
Note: This function only works on numerical arrays.
Parameter | Description |
---|---|
var1 | Required. The first variable to assign a value to |
var2,... | Optional. More variables to assign values to |
Return Value: | Returns the assigned array |
---|---|
PHP Version: | 4+ |
Using the first and third variables: